package be.gnx.log4jeclipse.perspective.view;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

import be.gnx.log4jeclipse.log4j.Log4JListener;
import be.gnx.log4jeclipse.perspective.widget.Log4JEntriesWidget;

public class Log4JEntriesView extends ViewPart {

  private Log4JEntriesWidget log4JEntriesWidget;

  public static void addLog4JEntriesEvents(Log4JEntriesEvents log4JEntriesEvents) {
    Log4JEntriesWidget.addLog4JEntriesEvents(log4JEntriesEvents);
  }

  @Override
  public void createPartControl(Composite parent) {
    log4JEntriesWidget = new Log4JEntriesWidget(parent, SWT.NONE);
    Log4JListener.getInstance().addLog4JListenerEvents(log4JEntriesWidget);
  }

  @Override
  public void setFocus() {
  }

}
